home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
028a
/
dkexp101.zip
/
DSKEXP.DOC
next >
Wrap
Text File
|
1991-11-25
|
28KB
|
824 lines
DISK EXPRESS
for Creating
Self-Extract Diskette Image
DSKEXP
Version 1.01
11/25/91
TABLE OF CONTENTS
_________________________________________________________________
I. INTRODUCTION TO DSKEXP ................................2
II. SYSTEM REQUIREMENTS ..................................2
III. COPYRIGHT NOTICE ....................................3
IV. WARRANTY .............................................3
V. COST OF DSKEXP ........................................4
VI. ACKNOWLEDGEMENT ......................................4
VII. CONTENTS OF THIS PACKAGE ............................4
VIII. SYNTAX .............................................5
IX. EXAMPLES .............................................5
Example 1: ..........................................5
Example 2: ..........................................6
Example 3: ..........................................7
Example 4: ..........................................8
Example 5: ..........................................8
Example 6: ..........................................10
X. ERROR MESSAGES ........................................12
XI. LIMITATIONS ..........................................14
I. INTRODUCTION TO DSKEXP
_________________________________________________________________
What is DSKEXP?
DSKEXP (pronounced as "Disk Express") allows a diskette image to
be created for electronic transmission. Think of it as a way to
FAX your diskettes across the globe, almost like having an
express delivery service right at your home or office! This
concept is certainly not new, but I have added the twist so that
the resulting diskette image is a self-extracting executable
file. There is no need for a decompressor on the other end to
unpack the file (or figure out which unpacker to use). And
certainly no worry for purchasing or licensing multiple copies
of the unpacker!
Here is a brief summary of its capabilities:
- DSKEXP recognizes all standard DOS formatted diskettes, this
includes 160K, 180K, 320K, 360K, 720K, 1.2M, 1.44M, and the
latest 2.88M diskettes. Any internal or external diskette
drives via DOS or OS/2 block device drivers are recognized
(ie: diskette drives accessed via DRIVER.SYS, $FDD5.SYS, etc.)
All information on the diskette is saved to a file for
electronic transmission, no information is lost! (see /a
switch for detail).
- DSKEXP can be used for diskette conversion. For example, a
360K diskette image can be restored onto a 720K, 1.2M, 1.44M,
or 2.88M diskette. If someone sends you a bootable 360K
diskette image, you can restore it onto a 720K diskette, and
it'll still be bootable!
- Diskette image is an .EXE file, which can be a DOS or OS/2
executable (selectable via command line switch).
- Advanced data compression based on a modified Lempel-Ziv-
Huffman-RLL algorithm. In most cases, it compresses better
than many archive programs.
- Advanced virus protection. DSKEXP detects illegal program
modifications whether it's by virus, or by hackers.
- Multiple 32-bit CRC data protection. The image is protected
by several 32-bit CRCs. In some cases, if a certain part of
the image is modified, the resulting diskette can still be
usable.
- Upgradability of self-extract code. DSKEXP provides a mean
to upgrade the self-extract code within the image file, for
bugs fix, and future code enhancements upgrade.
II. SYSTEM REQUIREMENTS
_________________________________________________________________
IBM PC, PC-AT, PS/1, PS/2 and 100% compatibles. Minimum 256K
conventional memory. MS-DOS or PC-DOS version 3.00 for DSKEXP
2
(DOS version 3.20 is required for running self-extract images
produced by DSKEXP). OS/2 1.2 and above for DSKEXP2. Hard disk
is required for storing large image file. User must also provide
the necessary program(s) for sending diskette image files through
telephone network with the use of a modem, and whatever is
necessary with any other electronic networks.
III. COPYRIGHT NOTICE
_________________________________________________________________
DSKEXP (Disk Express) Version 1.01 11/25/91
Copyright (c) 1991 by
Albert J. Shan
All Rights Reserved. No part of this program can be modified or
altered by any means.
You are free to use, copy and distribute DSKEXP for non-
commercial use if:
- No fee is charged for use, copying or distribution.
- It is not modified in any way.
Clubs and user groups may charge a nominal fee for expenses and
handling while distributing DSKEXP.
IV. WARRANTY
_________________________________________________________________
I, Albert J. Shan, make no warranties, expressed or implied,
including, but not limited to, merchantability or fitness for any
particular purpose. In no event shall Albert J. Shan be liable
for indirect or consequential damages arising from the use of the
software program.
You are free to redistribute this package in its entirety. No
part of this package may be included as part of a commercial
package. If you have any questions about commercial distribution
of DSKEXP, I can be contacted at:
Albert J. Shan
866 Citadel Drive
Port Coquitlam, British Columbia
CANADA V3C 5Y1
or via CompuServe, ID 70730,401
3
V. COST OF DSKEXP
_________________________________________________________________
Originally I thought of distributing DSKEXP as shareware but
seriously dislike the guilt games some shareware authors include.
So, I've decided to try beggarware. Here's the product. Use it.
If you like it I'd be very happy if you'd sent a donation for $20
U.S. or Canadian. (Cash, money orders, and checks are welcome.
For U.S. users, it's easiest to get money order from the post
office) If you think $20 is out of line, send less (or more) or
wine cooler. If you don't think DSKEXP is worth a dime, at least
send me a postcard explaining why you don't like it. Whether you
send anything or not I would like to hear about any suggestions
or bugs. Of course, requests accompanied by money will tend to
get higher priority.
VI. ACKNOWLEDGEMENT
_________________________________________________________________
First on the list I must thank Haruyasu Yoshizaki for the
conception of the compression code. Some pieces of DSKEXP have
been lifted directly from the C version of LH compression code.
Hopefully, I only took the bug-free ones. I'd like to thank Kenn
Dimock and Sam Chau for various testings and suggestions to make
this program possible.
VII. CONTENTS OF THIS PACKAGE
_________________________________________________________________
The following files are included in this self-extract archive:
DSKEXP - DOS version of the program
DSKEXP2 - OS/2 version of the program
DSKEXP.DOC - This documentation
DSKEXP.HST - History file
4
VIII. SYNTAX
_________________________________________________________________
Type DSKEXP at the DOS prompt, and you'll receive this help screen:
(DSKEXP2 from the OS/2 prompt for the OS/2 version)
Disk Express (DOS) Version 1.01 11/25/91
Created by Albert J. Shan Copyright (c) 1991
Usage: DSKEXP [options] [drive:] [d:][path]filename
[options] /a Read the entire disk (all sectors)
/d Input diskette image description (5 lines max.)
/e Edit description in image file
/n Disable data compression
/r Replace image file with new extract code
/s Suppress overwrite prompt
/OS2 Output .EXE for OS/2 (default is DOS)
drive Drive letter of a valid floppy drive
(specifying drive letter overrides /e and /r)
[d:][path]filename Name of output file (drive and path optional)
*** Please Note ***
This program creates self-extract diskette image for non-
copy-protected diskettes only. Original diskette must not
contain any unreadable sectors.
Supported media: 160K, 180K, 320K, 360K, 1.2M, 720K,
1.44M and 2.88M DOS diskettes.
*** Note: The default output file for DSKEXP2 is OS/2 executable,
and the switch for making a DOS executable for DSKEXP2 is /DOS.
IX. EXAMPLES
_________________________________________________________________
Instead of trying to bore everyone with explanations of each and
every command switch, how about some examples?
Example 1:
Suppose you want to pack a 360K diskette in drive B: onto a file
called 'disk1' for modem transmission, you type:
C:\> dskexp b: e:\upload\disk1
DSKEXP will automatically append .EXE onto the output file name.
If you specify something else as file extension, it will strip it
off before appending. If the command line syntax is correct,
DSKEXP will first run a self-check for virus/modification, then
5
it will proceed to create the diskette image. You'll receive a
screen similar to the following after DSKEXP is finished:
Checking DSKEXP for modifications ... OK.
Self-extract image will be built for the DOS environment.
360K diskette found in drive B:
File Allocation Table statistics:
Track 06 head 0 contains the last allocated sector, sector 109.
Compressing track 06 head 0 (100%)
24% of diskette image compressed.
32-bit CRC of diskette image is 15CEF948
By default, DSKEXP will analyze the FAT and save up to the last
sector used on the diskette. In the above example, it stops at
track 6, head 0, because sector 109 is the last used sector. If
you have a fragmented diskette, you might receive a screen
similar to the following when you run DSKEXP:
Checking DSKEXP for modifications ... OK.
Self-extract image will be built for the DOS environment.
1.44M diskette found in drive A:
File Allocation Table statistics:
Track 36 head 1 contains the last allocated sector, sector 1319.
Disk fragmentation detected:
814 unallocated sectors will be saved in image (61% of total used sectors).
The diskette requires compression for maximum storage efficiency.
Compressing track 00 head 0 (1%)
etc.
It's recommended a disk optimization utility is run on the
diskette to pack files together for maximum storage efficiency.
Alternatively, you can copy all the files to another freshly
formatted diskette so that the files are packed next to each
other.
Example 2:
Suppose you discovered that you really want to save the image
from your drive A: with a 720K diskette as opposed to the 360K
diskette in drive B:. But this time, you want to save the entire
diskette (including all the unused sectors) into the image with
compression turned off, you type:
C:\> dskexp /a /n a: e:\upload\disk1
You will then see this warning:
6
Checking DSKEXP for modifications ... OK.
Self-extract image will be built for the DOS environment.
E:\UPLOAD\DISK1.EXE exists, overwrite? (y/N):
Default is 'No' (or just press Enter). Type 'y' then 'Enter' to
overwrite.
To suppress the warning, that is, to default 'y' for overwriting
an existing file, specify /s on the command line:
C:\> dskexp /a /n a: e:\upload\disk1 /s
Notice that you can specify switches anywhere you want on the
command line, DSKEXP will sort them out for you!
Example 3:
Suppose you want the output file as an OS/2 executable, say, the
person on the other end wants to take advantage of a true pre-
emptive multitasking environment, so that unpacking the diskette
image won't take up all the CPU cycles. And at the same time,
you want to enter a description for the image, so the recipient
knows what this is for, you type:
C:\> dskexp b: test15 /s /d /os2
You'll then see:
Checking DSKEXP for modifications ... OK.
Self-extract image will be built for the OS/2 environment.
Please enter diskette description: (5 lines max.)
┌────────────────────────────────────────┐
1:
You're then prompted to enter a maximum of five lines of
description (40 characters for each line). (To enter a blank
line, just press Enter.)
To continue our example, type in the following:
Please enter diskette description: (5 lines max.)
┌────────────────────────────────────────┐
1: Joe,
2: This is the latest beta release of Space
3: Commander. Try it out without a joy
4: stick and let me know how it goes.
5: Regards, John
360K diskette found in drive B:
File Allocation Table statistics:
Track 06 head 0 contains the last allocated sector, sector 109.
7
Reading track 00 head 1 (15%)
etc.
Example 4:
Suppose you really want to save the image as a DOS executable as
opposed as an OS/2 executable. Instead of starting all over
again, you can simply type:
C:\> dskexp test15 /r /dos
You'll see:
Checking DSKEXP for modifications ... OK.
Self-extract image will be built for the DOS environment.
Copying diskette image data ... OK.
The /r switch requires that you have enough disk space for the
operation. It'll abort if you ran out of disk space, and the
original image file will be left untouched. (Free disk space of
the equivalent of the image file is needed for replacing the
self-extract header.) The /r switch can also be used for
upgrading images created by an older version of DSKEXP for bug
fixes (in case one of you out there finds a bug in the self-
extract code --- since this is the first release of the program
we're talking about!) If there is any future enhancement in the
self-extract portion of DSKEXP, the users won't have to redo the
images all over again, all is require is to run DSKEXP against
the image file with the /r switch!
On top of the /r switch we just saw, you can change the
description of the image while replacing the self-extract code
all in one step:
C:\> dskexp test15 /r/dos/e
The /e switch allows description in the image file to be edited.
(This example also illustrates that space is not necessary as a
command switch delimiter when specifying command line switches).
Example 5:
Now that you have the self-extract image, what are you going to
do with it? Simply run it! To unpack the disk image created in
example 4, type 'test15' to see the help screen:
8
Self-Extract Diskette Image
Created by Disk Express (DSKEXP) Version 1.01 11/25/91
DSKEXP created by Albert J. Shan Copyright (c) 1991
Usage: TEST15 [options] drive
[options] /d Display diskette image description
/f Format destination diskette
/v Verify ON (system verify plus read and compare)
/s Suppress overwrite warning/self-check prompt
/c Convert image onto a higher density diskette
(Target diskette must be pre-formatted, and
may be of different form factor. It also
overrides /f)
drive Drive letter of a valid floppy disk drive
*** Please Note ***
The target diskette must be free of defect (no bad sectors).
Supported media: 160K, 180K, 320K, 360K, 1.2M, 720K,
1.44M and 2.88M DOS diskettes.
To finish our example, now type:
C:\> test15 b:
You'll see:
Diskette in drive B: is about to be overwritten
with new information. Do you wish to continue? (y/N)
Default action is 'No'. The prompt can be suppressed by
specifying /s on the command line:
C:\> test15 b: /s
To display the diskette image description without writing out to
the diskette, simply type:
C:\> test15 /d
And you'll see:
┌────── Diskette Image Description ──────┐
Joe,
This is the latest beta release of Space
Commander. Try it out without a joy
stick and let me know how it goes.
Regards, John
└────────────────────────────────────────┘
Diskette image stored is for a 360K diskette.
9
You can combine some of the switches, and even specify /f to
format the destination diskette:
C:\> test15 /s b: /d/f
And you'll see:
┌────── Diskette Image Description ──────┐
Joe,
This is the latest beta release of Space
Commander. Try it out without a joy
stick and let me know how it goes.
Regards, John
└────────────────────────────────────────┘
Diskette image stored is for a 360K diskette.
Formatting track 00 head 1 (2%)
etc.
Example 6:
Now that Joe got the diskette image. He doesn't have a 360K or
1.2M drive (5.25" drive). All he has is a 1.44M 3.5" drive. He
also happens to have a spare 720K (low-density) diskette he can
use. What can he do? He can use the /c switch to convert the
diskette image from 360K to 720K, and all the data will still be
intact, and usable. The restriction is that the diskette must be
pre-formatted. So, Joe went ahead and formatted the diskette as
a 720K diskette, and he types:
C:\> test15 a: /s /c
And receives the following screen:
Diskette image stored is for a 360K diskette.
720K diskette found in drive A:
Converting 360K image onto 720K diskette ...
Decompressing track 01 head 0 (3%)
etc.
Basically, DSKEXP allows any lower density diskette image to be
converted to a higher density diskette, regardless of form
factors (ie: from 5.25" to 3.5" and vice versa). The resulting
diskette will have all the original information, and if the
original diskette is bootable, the resulting converted diskette
will also be bootable! The limitation is that the diskette to
receive the converted data must be pre-formatted, /f is not
allowed and is suppressed when /c is specified. Also, the
converted diskette can only be recognized by the higher density
drive. For example, a formatted 1.2M diskette converted to 360K
with the /c switch can only be recognized by a 1.2M drive; not
with a 360K unit.
10
In addition, you can specify /v to verify the write to the
diskette. This is accomplished by the operating system verify
routine (whether it is DOS or OS/2), and immediately followed by
a read and a byte by byte compare of the original data to ensure
the diskette write is successful (Warning: disk cache may cancel
the effect of the latter by providing the data from the cache).
11
X. ERROR MESSAGES
_________________________________________________________________
DSKEXP incorporates 32-bit CRC checking for itself and the image
it produces. In the event of virus infection or other means of
modifications (such as errors in electronic transmissions), the
program will abort, and the following message is displayed:
*** Program has been modified.
Probable cause of modification:
1. Errors during electronic transmission OR
2. Possible virus infection.
Here is a run down of all the major error messages produced by
DSKEXP, DSKEXP2 and the images they produce:
When DSKEXP (or the self-extract DOS image) encounters an error,
you may receive the following messages:
> For bad or not properly formatted diskette during read or
write:
*** Address mark not found.
*** Sector not found.
*** Bad CRC.
*** Unknown media.
> When disk is full during image creation (output will be
deleted):
*** Error writing disk or disk full.
> With a write protected diskette during diskette write:
*** Diskette is write protected.
> When replacing self-extract code in images with a lower
revision level of DSKEXP:
*** Image was created by DSKEXP x.xx
which is of higher revision level.
> When diskette drive is not ready:
*** Drive X: not ready.
> When drive specified is not a diskette drive:
*** Drive X: is not a floppy drive.
12
> Any other error messages returned by DOS are displayed as:
*** Error n, Drive X:
For DSKEXP2 (or the self-extract OS/2 image), you may encounter
the following error messages:
> For bad or not properly formatted diskette during read or
write:
*** Bad CRC.
*** Sector not found.
*** General failure reading drive X:
*** Unknown media.
> When disk is full during image creation:
*** Error writing disk or disk full.
> When replacing self-extract code in images with a lower
revision level DSKEXP:
*** Image was created by DSKEXP x.xx
which is of higher revision level.
> For write protected diskette during diskette write:
*** Diskette is write protected.
> When diskette drive is not ready:
*** Drive X: not ready.
> When drive specified is not a diskette drive:
*** Drive X: is not a floppy drive.
*** Invalid drive specified.
> Any other error messages returned by OS/2 are displayed as:
*** Error n, Drive X:
13
XI. LIMITATIONS
_________________________________________________________________
DSKEXP is designed to be a self-extract diskette image program
from the day of its conception. As such, the extract code is
bundled as an overhead for each image produced. The overhead is
currently 14K for the DOS version, and 19K for the OS/2 version.
This is not too bad, consider the size of any non-trivial
diskette image is usually quite large (in the order of several
hundred kilo bytes or even mega bytes), 19K should require no
more that a minute and a half for a 2400 baud modem to transfer,
and with a 14.4K V.32bis modem, the overhead is less than 12
seconds. In the future, I *hope* to trim this down (by recoding
as much as possible in Assembly). It is also possible to produce
a family version (DOS and OS/2 dual mode executable) of the
program, however, the file size produced by the standard method
is about twice as big as the current sizes. Until I figure out
how to do this properly, a family version is unlikely.
Other limitations include the inability to read a diskette drive
over the LAN (limitation of the network driver), and copy
protected programs. I really don't like the idea of coding
DSKEXP so that it can recognize copy protected schemes, as I try
to discourage the use of this program for pirating copy protected
software. Another limitation is its inability to read over
physically bad sectors. This is currently on my list of features
to be incorporated in the next release of DSKEXP.
There are some other features I'd like to implement (such as the
ones I just mentioned above). Instead of delaying the release
for all these again and again (which I have obviously done so, as
the first release is labeled 'Version 1.01' instead of 1.00), I
decided to let it out and get some feedback from users around the
world. If there are features you'd like to see in DSKEXP, I'll
consider the possibility (within my abilities) of incorporating
them in a future release. Enjoy!
14